
#ifndef __FSM_GPU__
#define __FSM_GPU__

#include "renderVertexArray.h"
#include "BmpImage.h"

class ShaderObject;
class FramebufferObject;

enum {
	ID_LIST_SOIL = 1
};

class cFSMGPU {
public:
	enum
	{
		POSITIONS_NEXT_ID,
		POSITIONS_ID,
		LABELS_ID,
		FSM_ID
	};
	cFSMGPU  ();
	~cFSMGPU ();
	unsigned int calculateState		(float fps);
	void DisplayTextures	();
	void showAgents			();
	void showAgentsInstanced	();
	void setFBOProjection (int w, int h);
	void restoreProjection ();

	FramebufferObject	*agentsFBO;
	
	RenderVertexArray	*agentsRTV;
	
	int numAgentsHeight, numAgentsWidth; //num agents

	unsigned int texIdFBO[FSM_ID + 1];
    
private:
	void DrawQuad (int w, int h, int tw, int th);
	void DisplayTexture (unsigned int texId, int w, int h);
	
	ShaderObject	*passthru;
	ShaderObject	*fsmSimpleShader;
	
	int vp[4];

//	int			scaleFactor;

};

#endif __FSM_GPU__
